package com.hbnu.dao;

import com.hbnu.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {
    @Insert("insert into tb_user(name,addr) values (#{name},#{addr})")
    public abstract void addData3(User user);

    @Update("update tb_user set addr=#{addr} where id=#{id}")
    public abstract void UpdateData3(User user);
    @Update("update tb_user set name=#{name} where id=#{id}")
    public abstract void updateData4(@Param(value = "name")String name,@Param(value = "id")int id);

    @Delete("delete from tb_user where name=#{name}")
    public abstract void DeleteData3(User user);
   @Select("select * from tb_user where id =#{id}")
    public abstract User findById4(int id);
   @Select("select * from tb_user")
    public abstract List<User> findAll3();


}
